#include "UiVPListCtrlWnd.h"
#ifdef MERGER_APP_TO_SHELL
	extern HINSTANCE g_SDHResModuleHandle;
#endif
UiVPListCtrlWnd::UiVPListCtrlWnd()
{
}

UiVPListCtrlWnd::~UiVPListCtrlWnd()
{
}

BOOL UiVPListCtrlWnd::InitUiWin(void)
{
	BOOL bRtn = FALSE;
	LoadiInterItem();
	return bRtn;
}

void UiVPListCtrlWnd::PaintWin(HDC hdc, RECT* prcWin, RECT* prcUpdate)
{
//	m_ControlWndBG->Draw(hdc, prcWin, false, false);
}

int UiVPListCtrlWnd::OnLButtonDown(UINT fwKeys, int xPos, int yPos)
{
	return UiWin::OnLButtonDown(fwKeys, xPos, yPos);

}

int UiVPListCtrlWnd::OnLButtonUp(UINT fwKeys, int xPos, int yPos)
{
	return UiWin::OnLButtonUp(fwKeys, xPos, yPos);

}

void UiVPListCtrlWnd::LoadiInterItem()
{
//jdhuang 20120818
#ifndef MERGER_APP_TO_SHELL	
//	m_ControlWndBG = ImagingHelper::GetImageObject(MzGetInstanceHandle(), 1065);
#else
//	m_ControlWndBG = ImagingHelper::GetImageObject(g_SDHResModuleHandle, 3065);
#endif

	RECT rtBtnVPListCtrlWnd[MAX_VP_LIST_CTRL_BTN] = 
	{
/*
		310, 100, 75, 75,
		310, 185, 75, 75,
		310, 270, 75, 75,
		310, 355, 75, 75,
*/
		0, 0, 75, 75,
		0, 85, 75, 160,
		0, 170, 75, 245,
		0, 255, 75, 330,
	};

	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].SetPos(rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].left, rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].top,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].right - rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].left,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].bottom - rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].top);
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].SetID(3400);
#ifndef MERGER_APP_TO_SHELL	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].SetNormalImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2014, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].SetPressedImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2015, true));
#else
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].SetNormalImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7114, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE].SetPressedImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7115, true));
#endif
	AddChild(&m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDONE]);

	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].SetPos(rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].left, rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].top,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].right - rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].left,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].bottom - rtBtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].top);
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].SetID(3401);
#ifndef MERGER_APP_TO_SHELL	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].SetNormalImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2016, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].SetPressedImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2017, true));
#else
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].SetNormalImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7116, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL].SetPressedImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7117, true));
#endif
	AddChild(&m_BtnVPListCtrlWnd[VP_LIST_CTRL_ADDALL]);

	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].SetPos(rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].left, rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].top,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].right - rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].left,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].bottom - rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].top);
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].SetID(3402);
#ifndef MERGER_APP_TO_SHELL	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].SetNormalImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2010, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].SetPressedImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2011, true));
#else
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].SetNormalImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7110, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE].SetPressedImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7111, true));
#endif
	AddChild(&m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELONE]);
	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].SetPos(rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].left, rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].top,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].right - rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].left,
				rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].bottom - rtBtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].top);
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].SetID(3403);
#ifndef MERGER_APP_TO_SHELL	
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].SetNormalImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2012, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].SetPressedImage(ImagingHelper::GetImageObject(MzGetInstanceHandle(),2013, true));
#else
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].SetNormalImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7112, true));
	m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL].SetPressedImage(ImagingHelper::GetImageObject(g_SDHResModuleHandle,7113, true));
#endif
	AddChild(&m_BtnVPListCtrlWnd[VP_LIST_CTRL_DELALL]);

}

BOOL UiVPListCtrlWnd::InitImages()
{
	return TRUE;
}
void UiVPListCtrlWnd::DeleteImages()
{
}